from django_filters import rest_framework as filters
from .models import StrategyApplyRecord


class StrategyApplyRecordFilter(filters.FilterSet):
    date_from = filters.DateFilter(field_name='apply_time', lookup_expr='date__gte')
    date_to = filters.DateFilter(field_name='apply_time', lookup_expr='date__lte')

    class Meta:
        model = StrategyApplyRecord
        fields = ('apply_time',)
